package br.com.wepa.webapps.orca.logica.negocio.facade;

import br.com.wepa.webapps.orca.logica.negocio.BusinessException;
import br.com.wepa.webapps.orca.logica.negocio.facade.to.UsuarioTO;
import br.com.wepa.webapps.orca.logica.persistencia.PersistenceDelegator;


public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		PersistenceDelegator.getHibernatePersistence().connect();
		System.out.println("teste");
		UsuarioFacadeHome facade = FacadeDelegator.getUsuarioFacade();
		
		UsuarioTO to =  facade.instanceTO();
		to.setId(10);
		to.getSenha();
		to.setNome("OIIIIIIII");
		to.setLogin("fabvs");
		to.setIdConstrutora(2);
		to.setIdCredencial(1);
		to.setUpdate(false);
		
		try {
			facade.setUp(to);
		} catch (BusinessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

}
